/*
* Configuration of module: Dem
*
* Created by:   qinminyuan
* Copyright:    (C)  
*
* Configured for (MCU):    MCU
*
* Module vendor:           ArcCore
* Generator version:       01.00
*/
#ifndef DEM_CFG_H
#define DEM_CFG_H
/* ============================ [ INCLUDES  ] ====================================================== */
/* ============================ [ MACROS    ] ====================================================== */
#define DEM_VERSION_INFO_API        STD_OFF
#define DEM_DEV_ERROR_DETECT        STD_OFF
#define DEM_USE_NVM                 STD_OFF
#define DEM_OBD_SUPPORT             STD_OFF
#define DEM_PTO_SUPPORT             STD_OFF
#define DEM_CLEAR_ALL_EVENTS        STD_ON

#define DEM_TYPE_OF_DTC_SUPPORTED          0x01
#define DEM_DTC_STATUS_AVAILABILITY_MASK   0xFF
#define DEM_MAX_NUMBER_EVENT               7
#define DEM_MAX_NUMBER_FF_DATA_PRI_MEM     7
#define DEM_FF_DID_LENGTH                  0 //TBD    // Length of DID & PID of FreezeFrames in Bytes.
#define DEM_MAX_NUMBER_EVENT_ENTRY_MIR        0    // Max nr of events stored in mirror memory.
#define DEM_MAX_NUMBER_EVENT_ENTRY_PER        0    // Max nr of events stored in permanent memory.
#define DEM_MAX_NUMBER_EVENT_ENTRY_PRI        DEM_MAX_NUMBER_EVENT    // Max nr of events stored in primary memory.
#define DEM_MAX_NUMBER_EVENT_ENTRY_SEC        0    // Max nr of events stored in secondary memory.
#define DEM_MAX_NUMBER_PRESTORED_FF            0    // Max nr of prestored FreezeFrames. 0=Not supported.

/*
 * Size limitations of the types derived from DemGeneral
 */
#define DEM_MAX_NR_OF_EVENT_DESTINATION             1    // 0..4 according to Autosar
#define DEM_MAX_NR_OF_RECORDS_IN_EXTENDED_DATA	    1	// 0..253 according to Autosar

/*
 * Size limitations of storage area
 */
#define DEM_MAX_SIZE_FF_DATA                      60    // Max number of bytes in one freeze frame
#define DEM_MAX_SIZE_EXT_DATA                     10    // Max number of bytes in one extended data record

#define DEM_MAX_NUMBER_EVENT_PRE_INIT             DEM_MAX_NUMBER_EVENT    // Max number of events status to keep before init
#define DEM_MAX_NUMBER_FF_DATA_PRE_INIT           DEM_MAX_NUMBER_EVENT    // Max number of freeze frames to store before init
#define DEM_MAX_NUMBER_EXT_DATA_PRE_INIT          DEM_MAX_NUMBER_EVENT    // Max number of extended data to store before init

#define DEM_MAX_NUMBER_EVENT_PRI_MEM              (DEM_MAX_NUMBER_EVENT_ENTRY_PRI)    // Max number of events status to store in primary memory
#define DEM_MAX_NUMBER_EXT_DATA_PRI_MEM           5                                    // Max number of extended data to store in primary memory

#define DEM_MAX_NUMBER_AGING_PRI_MEM              DEM_MAX_NUMBER_EVENT
#define DEM_DID_IDENTIFIER_SIZE_OF_BYTES          2
#define DEM_FREEZEFRAME_DEFAULT_VALUE             1

//#define HealingMirrorBuffer ((void*)&NvM_Block_TBD_DataGroup_RAM)

/* ============================ [ TYPES     ] ====================================================== */
/* ============================ [ DECLARES  ] ====================================================== */
/* ============================ [ DATAS     ] ====================================================== */
/* ============================ [ LOCALS    ] ====================================================== */
/* ============================ [ FUNCTIONS ] ====================================================== */
#endif

